export const isAuth = (path, btnCode) => {
  // debugger
	const role = uni.getStorageSync('ROLE_AUTH')
  if(!role) {
    return false;
  }
	if (btnCode == undefined) {
		let el = role.find((item) => item.path == path)
		if (el) {
			return true
		} else {
			return false
		}
	} else {
		let el = role.find((item) => item.path == path);
    if(el?.buttonCodeList?.some?.((ele=> ele.code == btnCode))) {
      return true
    } else {
      return false
    } 
	}
}
